#!/soft/python-2.6/bin/python

import os
import cgi
import cgitb; cgitb.enable()
import urllib

def main():
    print "Content-Type: application/json\r\n"
    url = 'http://en.wikipedia.org/w/api.php?' + os.getenv('QUERY_STRING', '')
    data = urllib.urlopen(url).read()

    print data

main()
